home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Source Code / Libraries / CW GUSI 1.6.4 / include / sys⁄errno.h < prev    next >
Text File  |  1995-05-04  |  7KB  |  160 lines

  1. /*
  2.  * Copyright (c) 1982, 1986, 1989 Regents of the University of California.
  3.  * All rights reserved.
  4.  *
  5.  * Redistribution and use in source and binary forms, with or without
  6.  * modification, are permitted provided that the following conditions
  7.  * are met:
  8.  * 1. Redistributions of source code must retain the above copyright
  9.  *    notice, this list of conditions and the following disclaimer.
  10.  * 2. Redistributions in binary form must reproduce the above copyright
  11.  *    notice, this list of conditions and the following disclaimer in the
  12.  *    documentation and/or other materials provided with the distribution.
  13.  * 3. All advertising materials mentioning features or use of this software
  14.  *    must display the following acknowledgement:
  15.  *    This product includes software developed by the University of
  16.  *    California, Berkeley and its contributors.
  17.  * 4. Neither the name of the University nor the names of its contributors
  18.  *    may be used to endorse or promote products derived from this software
  19.  *    without specific prior written permission.
  20.  *
  21.  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  22.  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  23.  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  24.  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  25.  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  26.  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  27.  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  28.  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  29.  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  30.  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  31.  * SUCH DAMAGE.
  32.  *
  33.  *    @(#)errno.h    7.13 (Berkeley) 2/19/91
  34.  */
  35.  
  36. #ifndef KERNEL
  37. extern int errno;            /* global error number */
  38. #endif
  39.  
  40. #define    EPERM            1        /* Operation not permitted */
  41. #define    ENOENT        2        /* No such file or directory */
  42. #define    ESRCH            3        /* No such process */
  43. #define    EINTR            4        /* Interrupted system call */
  44. #define    EIO            5        /* Input/output error */
  45. #define    ENXIO            6        /* Device not configured */
  46. #define    E2BIG            7        /* Argument list too long */
  47. #define    ENOEXEC        8        /* Exec format error */
  48. #define    EBADF            9        /* Bad file descriptor */
  49. #define    ECHILD        10        /* No child processes */
  50. #define    EDEADLK        11        /* Resource deadlock avoided */
  51.                     /* 11 was EAGAIN */
  52. #define    ENOMEM        12        /* Cannot allocate memory */
  53. #define    EACCES        13        /* Permission denied */
  54. #define    EFAULT        14        /* Bad address */
  55. #ifndef _POSIX_SOURCE
  56. #define    ENOTBLK        15        /* Block device required */
  57. #define    EBUSY            16        /* Device busy */
  58. #endif
  59. #define    EEXIST        17        /* File exists */
  60. #define    EXDEV            18        /* Cross-device link */
  61. #define    ENODEV        19        /* Operation not supported by device */
  62. #define    ENOTDIR        20        /* Not a directory */
  63. #define    EISDIR        21        /* Is a directory */
  64. #define    EINVAL        22        /* Invalid argument */
  65. #define    ENFILE        23        /* Too many open files in system */
  66. #define    EMFILE        24        /* Too many open files */
  67. #define    ENOTTY        25        /* Inappropriate ioctl for device */
  68. #ifndef _POSIX_SOURCE
  69. #define    ETXTBSY        26        /* Text file busy */
  70. #endif
  71. #define    EFBIG            27        /* File too large */
  72. #define    ENOSPC        28        /* No space left on device */
  73. #define    ESPIPE        29        /* Illegal seek */
  74. #define    EROFS            30        /* Read-only file system */
  75. #define    EMLINK        31        /* Too many links */
  76. #define    EPIPE            32        /* Broken pipe */
  77.  
  78. #ifndef __MWERKS__
  79. /* math software */
  80. #define    EDOM            33        /* Numerical argument out of domain */
  81. #define    ERANGE        34        /* Result too large */
  82. #endif
  83.  
  84. /* non-blocking and interrupt i/o */
  85. #if !defined(macintosh) && !defined(__MWERKS__)
  86. #define    EAGAIN        35        /* Resource temporarily unavailable */
  87. #define    EWOULDBLOCK    EAGAIN    /* Operation would block */
  88. #else
  89. #define    EWOULDBLOCK    11        /* Operation would block */
  90. #endif
  91. #ifndef _POSIX_SOURCE
  92. #define    EINPROGRESS    36        /* Operation now in progress */
  93. #define    EALREADY        37        /* Operation already in progress */
  94.  
  95. /* ipc/network software -- argument errors */
  96. #define    ENOTSOCK        38        /* Socket operation on non-socket */
  97. #define    EDESTADDRREQ    39        /* Destination address required */
  98. #define    EMSGSIZE        40        /* Message too long */
  99. #define    EPROTOTYPE    41        /* Protocol wrong type for socket */
  100. #define    ENOPROTOOPT    42        /* Protocol not available */
  101. #define    EPROTONOSUPPORT    43        /* Protocol not supported */
  102. #define    ESOCKTNOSUPPORT    44        /* Socket type not supported */
  103. #define    EOPNOTSUPP        45        /* Operation not supported on socket */
  104. #define    EPFNOSUPPORT    46        /* Protocol family not supported */
  105. #define    EAFNOSUPPORT    47        /* Address family not supported by protocol family */
  106. #define    EADDRINUSE        48        /* Address already in use */
  107. #define    EADDRNOTAVAIL    49        /* Can't assign requested address */
  108.  
  109. /* ipc/network software -- operational errors */
  110. #define    ENETDOWN            50        /* Network is down */
  111. #define    ENETUNREACH        51        /* Network is unreachable */
  112. #define    ENETRESET        52        /* Network dropped connection on reset */
  113. #define    ECONNABORTED    53        /* Software caused connection abort */
  114. #define    ECONNRESET        54        /* Connection reset by peer */
  115. #define    ENOBUFS            55        /* No buffer space available */
  116. #define    EISCONN            56        /* Socket is already connected */
  117. #define    ENOTCONN            57        /* Socket is not connected */
  118. #define    ESHUTDOWN        58        /* Can't send after socket shutdown */
  119. #define    ETOOMANYREFS    59        /* Too many references: can't splice */
  120. #define    ETIMEDOUT        60        /* Connection timed out */
  121. #define    ECONNREFUSED    61        /* Connection refused */
  122.  
  123. #define    ELOOP                62        /* Too many levels of symbolic links */
  124. #endif /* _POSIX_SOURCE */
  125. #define    ENAMETOOLONG    63        /* File name too long */
  126.  
  127. /* should be rearranged */
  128. #ifndef _POSIX_SOURCE
  129. #define    EHOSTDOWN        64        /* Host is down */
  130. #define    EHOSTUNREACH    65        /* No route to host */
  131. #endif /* _POSIX_SOURCE */
  132. #define    ENOTEMPTY        66        /* Directory not empty */
  133.  
  134. /* quotas & mush */
  135. #ifndef _POSIX_SOURCE
  136. #define    EPROCLIM            67        /* Too many processes */
  137. #define    EUSERS            68        /* Too many users */
  138. #define    EDQUOT            69        /* Disc quota exceeded */
  139.  
  140. /* Network File System */
  141. #define    ESTALE            70        /* Stale NFS file handle */
  142. #define    EREMOTE            71        /* Too many levels of remote in path */
  143. #define    EBADRPC            72        /* RPC struct is bad */
  144. #define    ERPCMISMATCH    73        /* RPC version wrong */
  145. #define    EPROGUNAVAIL    74        /* RPC prog. not avail */
  146. #define    EPROGMISMATCH    75        /* Program version wrong */
  147. #define    EPROCUNAVAIL    76        /* Bad procedure for program */
  148. #endif /* _POSIX_SOURCE */
  149.  
  150. #define    ENOLCK            77        /* No locks available */
  151. #define    ENOSYS            78        /* Function not implemented */
  152.  
  153. #define    EFTYPE            79        /* Inappropriate file type or format */
  154.  
  155. #ifdef KERNEL
  156. /* pseudo-errors returned inside kernel to modify return to process */
  157. #define    ERESTART    -1        /* restart syscall */
  158. #define    EJUSTRETURN    -2        /* don't modify regs, just return */
  159. #endif
  160.